<!DOCTYPE html>
<html lang="en">
<head>
  <meta charset="UTF-8">
  <title>test_</title>
  <script src="https://cdn.bootcss.com/vue/2.6.10/vue.js"></script>
</head>
<body>

<div id="app">
  <h1>v-if和V-for哪个优先级更高？如果两个同时出现，应该怎么优化得到更好的性能？</h1>
  <p v-for="child in children" v-if="isFolder"></p>
</div>

<script>
// v-if和V-for哪个优先级更高？如果两个同时出现，应该怎么优化得到更好的性能？
let app = new Vue({
  el: '#app',
  data() {
    return {
      children: [
        { title: 'foo' },
        { title: 'bar' }
      ]
    }
  },
  computed:{
    isFolder(){
      return this.children && this.children.length > 0
    }
  },
  created() {
  },
  mounted() {
  },
  methods: {}
})
console.log('app.$options.render:', app.$options.render)
</script>
</body>
</html>
